Component({
  properties: {
    // popStatus: {
    //   type: String,
    //   value: '',
    // },

  },
  data: {
    selectNum:0,
    selectList:[
        {
          name:'发布日期',
          value:0
        },
      {
        name:'法律性质',
        value:1
      },
      {
        name:'时效性',
        value:2
      },
    ],
    candidateList:[
      {
        name:"全部",
        value:0
      },
      {
        name:"近三天",
        value:1
      },
      {
        name:"近七天",
        value:2
      },
      {
        name:"近一月",
        value:3
      },
      {
        name:"近三月",
        value:4
      },
      {
        name:"近一年",
        value:5
      },
    ],
    candidate:0,
    timesList:[
      {
        name:"全部",
        value:0
      },
      {
        name:"近三天",
        value:1
      },
      {
        name:"近七天",
        value:2
      },
      {
        name:"近一月",
        value:3
      },
      {
        name:"近三月",
        value:4
      },
      {
        name:"近一年",
        value:5
      },
    ],
    law:[
      {
        name:"不限",
        value:0
      },
      {
        name:"标签名称",
        value:1
      },
      {
        name:"标签名称",
        value:2
      },
      {
        name:"标签名称",
        value:3
      },
      {
        name:"标签名称",
        value:4
      },
      {
        name:"标签名称",
        value:5
      },
    ],
    aging:[
      {
        name:"不限",
        value:0
      },
      {
        name:"有效",
        value:1
      },
      {
        name:"废止",
        value:2
      },
      {
        name:"尚未生效",
        value:3
      },
    ]
  },
  methods: {
    initCandidateFun(val){
      let dataList = []
      if(val == 0){
        dataList = this.data.timesList
      }else if(val == 1){
        dataList = this.data.law
      }else if(val == 2){
        dataList = this.data.aging
      }
      this.setData({
        selectNum:val,
        candidateList:dataList
      })
    },
    setCandidateFun(){

    },
    slectBind(evn){
      let items = evn.currentTarget.dataset.items
      let dataList = []
      if(items.value == 0){
        dataList = this.data.timesList
      }else if(items.value == 1){
        dataList = this.data.law
      }else if(items.value == 2){
        dataList = this.data.aging
      }
      this.setData({
        selectNum:items.value,
        candidateList:dataList
      })
    },
    bindPitch(evn){
      this.setData({
        candidate:evn.currentTarget.dataset.items.value
      })
    },
    reset(){

    },
    tapConfirm(){
      this.triggerEvent('tapConfirm', {

      });
    }
  }
})